//
//  TJJNetwork.h
//  TJJDownLoadDemo
//
//  Created by WangJiaheng on 16/1/18.
//  Copyright © 2016年 Shixiongwei. All rights reserved.
//

#import <Foundation/Foundation.h>
/**
 请求成功block
 */
typedef void (^requestSuccessBlock)(id responseObj);

/**
 请求失败block
 */
typedef void (^requestFailureBlock) (NSError *error);

/**
 请求响应block
 */
typedef void (^responseBlock)(id dataObj, NSError *error);

/**
 监听进度响应block
 */
typedef void (^progressBlock)(int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite);

@interface TJJNetwork : NSObject
/**
 下载文件，监听下载进度
 */
+ (void)downloadRequest:(NSString *)url successAndProgress:(progressBlock)progressHandler complete:(responseBlock)completionHandler;


@end
